home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / C++ A'Link Files / Jan 91 / CPlus.Dev$ 1⁄25⁄91 / 0260-Re False start-Jan91 next >
Encoding:
Text File  |  1991-03-06  |  778 b   |  22 lines  |  [TEXT/GEOL]

  1. Item    4947432                         18-Jan-91        21:14PST
  2.  
  3. From:   D6418                           Jeppson, John,PRT
  4.  
  5. To:     CPLUS.DEV$                      C++ Interest List--Developers
  6.  
  7. ------------------------------------------------------------------------------
  8.  
  9. Sub:    Re: False start
  10.  
  11. Your problem is a peculiarity of the MPW shell which sends the entire line as
  12. input.. including your prompt. So cin is getting the string which you just
  13. wrote with cout.
  14.  
  15. If you terminate your prompt with "\n" and input from the next line, then your
  16. program works correctly.
  17.  
  18. It's ugly, of course. I think someone once suggested a way to make the shell
  19. ignore first part of the line (the prompt) and just input the user's response,
  20. but I can't seem to remember how...
  21.  
  22.